package com.zhao.dota.contant;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class BuildingConst {

    public static final List<String> BUILDING_NAMES;
    private static final String NPC_DOTA_BADGUYS_FORT = "npc_dota_badguys_fort";
    private static final String NPC_DOTA_BADGUYS_FILLER = "npc_dota_badguys_filler";
    private static final String NPC_DOTA_BADGUYS_MELEE_RAX_TOP = "npc_dota_badguys_melee_rax_top";
    private static final String NPC_DOTA_BADGUYS_MELEE_RAX_MID = "npc_dota_badguys_melee_rax_mid";
    private static final String NPC_DOTA_BADGUYS_MELEE_RAX_BOT = "npc_dota_badguys_melee_rax_bot";
    private static final String NPC_DOTA_BADGUYS_RANGE_RAX_TOP = "npc_dota_badguys_range_rax_top";
    private static final String NPC_DOTA_BADGUYS_RANGE_RAX_MID = "npc_dota_badguys_range_rax_mid";
    private static final String NPC_DOTA_BADGUYS_RANGE_RAX_BOT = "npc_dota_badguys_range_rax_bot";
    private static final String NPC_DOTA_BADGUYS_TOWER1_TOP = "npc_dota_badguys_tower1_top";
    private static final String NPC_DOTA_BADGUYS_TOWER2_TOP = "npc_dota_badguys_tower2_top";
    private static final String NPC_DOTA_BADGUYS_TOWER3_TOP = "npc_dota_badguys_tower3_top";
    private static final String NPC_DOTA_BADGUYS_TOWER1_MID = "npc_dota_badguys_tower1_mid";
    private static final String NPC_DOTA_BADGUYS_TOWER2_MID = "npc_dota_badguys_tower2_mid";
    private static final String NPC_DOTA_BADGUYS_TOWER3_MID = "npc_dota_badguys_tower3_mid";
    private static final String NPC_DOTA_BADGUYS_TOWER1_BOT = "npc_dota_badguys_tower1_bot";
    private static final String NPC_DOTA_BADGUYS_TOWER2_BOT = "npc_dota_badguys_tower2_bot";
    private static final String NPC_DOTA_BADGUYS_TOWER3_BOT = "npc_dota_badguys_tower3_bot";
    private static final String NPC_DOTA_BADGUYS_TOWER4 = "npc_dota_badguys_tower4";
    private static final String NPC_DOTA_GOODGUYS_FORT = "npc_dota_goodguys_fort";
    private static final String NPC_DOTA_GOODGUYS_FILLER = "npc_dota_goodguys_filler";
    private static final String NPC_DOTA_GOODGUYS_MELEE_RAX_TOP = "npc_dota_goodguys_melee_rax_top";
    private static final String NPC_DOTA_GOODGUYS_MELEE_RAX_MID = "npc_dota_goodguys_melee_rax_mid";
    private static final String NPC_DOTA_GOODGUYS_MELEE_RAX_BOT = "npc_dota_goodguys_melee_rax_bot";
    private static final String NPC_DOTA_GOODGUYS_RANGE_RAX_TOP = "npc_dota_goodguys_range_rax_top";
    private static final String NPC_DOTA_GOODGUYS_RANGE_RAX_MID = "npc_dota_goodguys_range_rax_mid";
    private static final String NPC_DOTA_GOODGUYS_RANGE_RAX_BOT = "npc_dota_goodguys_range_rax_bot";
    private static final String NPC_DOTA_GOODGUYS_TOWER1_TOP = "npc_dota_goodguys_tower1_top";
    private static final String NPC_DOTA_GOODGUYS_TOWER2_TOP = "npc_dota_goodguys_tower2_top";
    private static final String NPC_DOTA_GOODGUYS_TOWER3_TOP = "npc_dota_goodguys_tower3_top";
    private static final String NPC_DOTA_GOODGUYS_TOWER1_MID = "npc_dota_goodguys_tower1_mid";
    private static final String NPC_DOTA_GOODGUYS_TOWER2_MID = "npc_dota_goodguys_tower2_mid";
    private static final String NPC_DOTA_GOODGUYS_TOWER3_MID = "npc_dota_goodguys_tower3_mid";
    private static final String NPC_DOTA_GOODGUYS_TOWER1_BOT = "npc_dota_goodguys_tower1_bot";
    private static final String NPC_DOTA_GOODGUYS_TOWER2_BOT = "npc_dota_goodguys_tower2_bot";
    private static final String NPC_DOTA_GOODGUYS_TOWER3_BOT = "npc_dota_goodguys_tower3_bot";
    private static final String NPC_DOTA_GOODGUYS_TOWER4 = "npc_dota_goodguys_tower4";
    private static final String DOTA_FOUNTAIN = "dota_fountain";

    static {
        List<String> buildingNames = new ArrayList<>();
        Field[] declaredFields = BuildingConst.class.getDeclaredFields();
        for (Field field : declaredFields) {
            if (String.class == field.getType() && Modifier.isStatic(field.getModifiers()) && Modifier.isFinal(field.getModifiers())) {
                try {
                    buildingNames.add((String) field.get(null));
                } catch (IllegalAccessException ignore) {
                }
            }
        }
        BUILDING_NAMES = Collections.unmodifiableList(buildingNames);
    }

}
